// dice.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include "dice.h"
#include <conio.h>
#include <ctime>

using namespace std;


dice::dice(void)
{
	srand((unsigned)time(NULL));
}


dice::~dice(void)
{
}

int dice::getNumber()
{
	int n;

	n = (rand()%6)+1;
	
	return n;
}

void dice::printDice(int n)
{
	switch(n)
	{
		case 1:
			cout <<"-------"<<endl;
			cout <<"!!!!!!!"<<endl;
			cout <<"!!!X!!!"<<endl;
			cout <<"!!!!!!!"<<endl;
			cout <<"-------"<<endl;
			break;
		case 2:
			cout <<"-------"<<endl;
			cout <<"!X!!!!!"<<endl;
			cout <<"!!!!!!!"<<endl;
			cout <<"!!!!!X!"<<endl;
			cout <<"-------"<<endl;
			break;
		case 3:
			cout <<"-------"<<endl;
			cout <<"!X!!!!!"<<endl;
			cout <<"!!!X!!!"<<endl;
			cout <<"!!!!!X!"<<endl;
			cout <<"-------"<<endl;
			break;
		case 4:
			cout <<"-------"<<endl;
			cout <<"!X!!!X!"<<endl;
			cout <<"!!!!!!!"<<endl;
			cout <<"!X!!!X!"<<endl;
			cout <<"-------"<<endl;
			break;
		case 5:
			cout <<"-------"<<endl;
			cout <<"!X!!!X!"<<endl;
			cout <<"!!!X!!!"<<endl;
			cout <<"!X!!!X!"<<endl;
			cout <<"-------"<<endl;
			break;
		case 6:
			cout <<"-------"<<endl;
			cout <<"!X!!!X!"<<endl;
			cout <<"!X!!!X!"<<endl;
			cout <<"!X!!!X!"<<endl;
			cout <<"-------"<<endl;
			break;
		default: 
			cout <<"Inte helt hundra.."<<endl;
	}
	
}